# $Id$
# Maintainer: Oscar Fuentes <ofv@wanadoo.es>
# Based on Arch's PKGBUILD

_realname=tcllib
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.21
pkgrel=2
pkgdesc="Set of pure-Tcl extensions (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://core.tcl.tk/tcllib/"
license=('bsd')
depends=("${MINGW_PACKAGE_PREFIX}-tcl")
source=(https://core.tcl-lang.org/tcllib/uv/tcllib-${pkgver}.tar.gz)
sha256sums=('46b2bb5ec8049363ae01645af11bda3bdb5db10629e807d81d1ad46cd1bead50')

package(){
  cd ${srcdir}/tcllib-${pkgver}
  tclsh installer.tcl \
    -pkg-path ${pkgdir}${MINGW_PREFIX}/lib/tcllib${pkgver} \
    -app-path ${pkgdir}${MINGW_PREFIX}/bin \
    -nroff-path ${pkgdir}${MINGW_PREFIX}/share/man/mann \
    -no-examples \
    -no-html \
    -no-wait \
    -no-gui
  mkdir -p ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/
  cp license.terms ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING
  rm -f $pkgdir${MINGW_PREFIX}/share/man/mann/{try,string,variable,zlib,coroutine}.n
}
